import { useParams, useLocation } from "react-router-dom";

export default function World() {
  // useParams() === props.match.params
  const params = useParams();

  // useLocation() === props.location
  const location = useLocation();

  // useSearchParmas()  === new URLSearchParams(location.search)
  // 该 hook 在 react-router-dom@6 才出现

  console.log("params", params);
  console.log("location", location);

  return <div>World</div>;
}
